The Internet Protocol Television (IPTV) is a new technology of providing home users with multiple interactive services including digital services by using a broadband wired network integrated with various technologies such as Internet, multimedia, and communication technologies. With the increasing of popularity, the IPTV is recognized worldwide. However, a great delay during the channel switching of the IPTV is always a problem with which users and operators of the IPTV are obsessed.
The channel switching delay may be caused by the following factors: a time taken by leaving an original channel multicast group, a time taken by joining a new channel multicast group, a time taken by a Set Top Box (STB) to buffer filled data, and a time taken by waiting for an I frame. The time taken by waiting for the I frame is the main factor.
The IPTV generally encodes a picture as an image sequence composed of the I frame, a P frame, and a B frame by using a video and audio compression encoding algorithm. The I frame is a frame thoroughly encoded for the whole picture, can be independently decoded and displayed, and provides reference for decoding of the relevant P frame and B frame. The P frame cannot be independently decoded or displayed, and can be decoded and displayed only after the I frame or a previous P frame referred to is received. The B frame cannot be independently decoded or displayed either, and can be decoded and displayed only after a previous frame (I frame or P frame) and a next frame (P frame) referred to are received. The P frame and the B frame mainly describe the difference between frames, so the P frame and the B frame have higher encoding efficiency than the I frame.
In the prior art, before channel switching, a buffer apparatus is required to buffer a multimedia data stream corresponding to an IPTV channel. During channel switching, a terminal initiates a session to request an I frame or a Group of Picture (GOP) from the buffer apparatus and join a multicast group corresponding to a destination channel at the same time, in which the GOP includes the I frame; the buffer apparatus pushes the I frame or the GOP to the terminal in unicast, and the terminal buffers the obtained I frame or GOP and starts to decode and display a received image sequence; and when the terminal finds that the I frame or GOP obtained from the buffer apparatus is repetitive with a multicast stream of the channel, the terminal stops obtaining the I frame or GOP from the buffer apparatus.
During the research and practice of the prior art, the inventors find that the prior art has the following problems.
(1) In the prior art, the terminal initiates a request for joining the multicast group. If the terminal joins the multicast group too early, two streams may be sent in one period of time, that is, one is a unicast stream and the other is a multicast stream, so that a packet easily gets lost and the processing time of the buffer apparatus is long, thereby affecting the efficiency; while if the terminal joins the multicast group too late, the time for the network buffer apparatus to process the channel switching of a single user is too long, which affects the concurrent number of processes performed by the network buffer apparatus on fast channel switching at the same moment, and reduces the efficiency.
(2) According to the scheme in the prior art, when the unicast stream is received, a transfer speed is negotiated between the terminal and the buffer apparatus, so that the time for the buffer apparatus to process the single channel switching is increased, and the transmission efficiency of the unicast stream is decreased.